package com.wangshouyu.mp.offiaccount;

import com.alibaba.fastjson.annotation.JSONField;
import com.fasterxml.jackson.annotation.JsonProperty;
import com.google.gson.annotations.SerializedName;

import java.io.Serializable;
import java.util.Objects;

/**
 * @author 王守钰
 * @date 2020年12月07日 12:43
 * @description 账户
 */
public class Account implements Serializable {

    /**
     * 客服账号
     */
    @SerializedName(value = "kf_account")
    @JsonProperty(value = "kf_account")
    @JSONField(name = "kf_account")
    private String account;

    /**
     * 客服昵称
     */
    @SerializedName(value = "nickname")
    @JsonProperty(value = "nickname")
    @JSONField(name = "nickname")
    private String nickName;

    /**
     * 密码
     */
    @SerializedName(value = "password")
    @JsonProperty(value = "password")
    @JSONField(name = "password")
    private String password;

    public String getAccount() {
        return account;
    }

    public void setAccount(String account) {
        this.account = account;
    }

    public String getNickName() {
        return nickName;
    }

    public void setNickName(String nickName) {
        this.nickName = nickName;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;
        Account account1 = (Account) o;
        return Objects.equals(account, account1.account) &&
                Objects.equals(nickName, account1.nickName) &&
                Objects.equals(password, account1.password);
    }

    @Override
    public int hashCode() {
        return Objects.hash(account, nickName, password);
    }

    @Override
    public String toString() {
        return "Account{" +
                "account='" + account + '\'' +
                ", nickName='" + nickName + '\'' +
                ", password='" + password + '\'' +
                '}';
    }
}
